<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Perform an NSAPI sub-request</title>
 </head>
 <body class="docs"><div id="layout">
  <div id="layout-content"><div id="function.nsapi-virtual" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">nsapi_virtual</h1>
  <p class="verinfo">(PHP 4 &gt;= 4.3.3, PHP 5, PHP 7)</p><p class="refpurpose"><span class="refname">nsapi_virtual</span> &mdash; <span class="dc-title">Perform an NSAPI sub-request</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-function.nsapi-virtual-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>nsapi_virtual</strong></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$uri</code></span>
   ) : <span class="type">bool</span></div>

  <p class="para rdfs-comment">
   <span class="function"><strong>nsapi_virtual()</strong></span> is an NSAPI-specific function which
   is equivalent to <em>&lt;!--#include virtual...--&gt;</em>
   in <acronym>SSI</acronym>
   (<var class="filename">.shtml</var> files). It does an NSAPI sub-request.
   It is useful for including CGI scripts or .shtml files, or anything
   else that you&#039;d parse through webserver.
  </p>
  <p class="para">
   To run the sub-request, all buffers are terminated and flushed to the
   browser, pending headers are sent too.
  </p>
  <p class="para">
   You cannot make recursive requests with this function to other PHP scripts.
   If you want to include PHP scripts, use <span class="function"><a href="include.html" class="function">include</a></span> or
   <span class="function"><a href="require.html" class="function">require</a></span>.
  </p>
  <blockquote class="note"><p><strong class="note">Note</strong>: 
   <p class="para">
    This function depends on a undocumented feature of the Netscape/iPlanet/Sun
    webservers. Use <span class="function"><a href="phpinfo.html" class="function">phpinfo()</a></span> to determine if it is available.
    In the Unix environment it should always work, in Windows it depends on the name of
    a <var class="filename">ns-httpdXX.dll</var> file.
   </p>
   <p class="para">
    Read the note about subrequests in the NSAPI section (<a href="install.unix.sun.html#install.unix.sun.notes" class="link">UNIX</a>, <a href="install.windows.legacy.index.html#install.windows.legacy.sun.notes" class="link">Windows</a>) if you experience
    this problem.
   </p>
  </p></blockquote>
 </div>

 <div class="refsect1 parameters" id="refsect1-function.nsapi-virtual-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>

    
     <dt>
<code class="parameter">uri</code></dt>

     <dd>

      <p class="para">
       The URI of the script.
      </p>
     </dd>

    
   </dl>

  </p>
 </div>

 <div class="refsect1 returnvalues" id="refsect1-function.nsapi-virtual-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   成功时返回 <strong><code>TRUE</code></strong>， 或者在失败时返回 <strong><code>FALSE</code></strong>。
  </p>
 </div>

</div></div></div></body></html>